package com.retailcloud.thirdpartyservice.controller;


import com.retailcloud.commonutils.utils.R;
import com.retailcloud.thirdpartyservice.service.MessageService;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author wudi
 * @date 2024/11/6
 * @comment
 */
@RestController
@RequestMapping("message")
public class SendMessageController {

    @Resource
    MessageService messageService;

    @RequestMapping("/send")
    public R send(@RequestBody Map<String, String> param) {
        messageService.sendMessage(param.get("phoneNumber"));
        return R.ok();
    }
}
